Splitlab
=SplitLab= Which Computer SplitLab is installed on the Windows side of the corner MacPro, and on the PASSCAL MacBook. Accessing SplitLab On the MacPro # Restart the Computer as into Windows by holding down the option key while restarting. #Start up Matlab (on the desktop in Windows) and type cd /'Documents and Settings'/Splitlab1.0.7 they type splitlab to start the program. On the PASSCAL MacBook I haven't used it on the PASSCAL MacBook, but I would assume it is pretty similar, just the usual Windows/Mac OS X differences. SplitLab Interface The SplitLab interface is separated into two columns. The left side is static, and the right side changes depending on what is selected on the left side. Left Side Save Preferences - Saves your settings, such as magnitude, distance window, preferred request server *General *Station *Search Window *Request *Phases *Find Files ?''' *Load Project - Lets you load a pre-existing splitlab project from a directory or a list of recent projects '''Save Project As - Save early and often to reduce the chance of disasters from occuring View Seismograms - 'View Database' - View the event database Results Right Side The right side of the SplitLab interface changes depending on the option selected on the left side of the interface. General General The first field is the name of the project, followed by two fields that have the paths to the data directory and the output directories. The next two fields are for printing and image output, and can usually be left alone. Comments The comments field is often used to note any problems with the project, what station and array is used, and what time period they are used for. Station *Station Code - the station code for the IRIS station of the project *Network Code - the IRIS network that the station is part of *Station latitude - The coordinates of the station so that SplitLab can locate relevant events *Station longitude *Misorientation - This and the lower selections are for any oddities that the station may have such as not being aligned North-South correctly, or the data is archived opposite of normal. Too the side there are buttons to quickly find station information in the various networks. Search window *Start Date - The starting date of the request, make sure it is sometime after the station was installed *End Date - End date of the request, usually give IRIS about a month to do their thing to get all the data in the best condition *Magnitude window - minimum and maximum magnitude for earthquakes of interest *distance window º - backangle from station (remember the latitude and longitude from earlier?) to the earthquake location *depth window km *Show statistic plot - pretty graphics Search earthquakes *Earthquake Catalogue file - The earthquake file is produced by Harvard of earthquakes that may be of interest to the users of SplitLab. Anytime that you are starting a significant new project, or it has been a long time since the last update it is a good idea to update. Thankfully it is a largely automatic process, just click ok. Request User info *Username - use something that no one else is hopefully using, especially if later on you are going to be requesting restricted data *Institude - All the rest of the fields just need your normal info *Address *Phone *Fax *email - This is the email that you want to have the request returned to. Data request info *Format - what format of request, usually we use breq_fast *Component - what part of the recorded data, we usually use BH? to get all the broadband data *Address - address of the breq_fast server *Request start time - How long before the event would you like data *Request stop time - And how long afterwards 'Send request mail' - No need to email from the computer, I'm not sure it's sendmail stack is set up anyways, just save the request file. Later on you will find it in the results directory of the project Phases Geekiness - It should be just fine for now Find Files Find files for earthquakes *File search string *Offset *Tolerance *Fine name format *Extract file times from filename *Extract file times from SAC-header (slow) - not really that slow Automatically associate SAC-files Manually associate SAC-files Export =replace.pl and Requesting from breq_fast= This script is designed to reformat the breq_fast requests into the correct format, rather than the format that splitlab will kick out. Split lab give you this: BARD YC 2000 12 20 16 50 00.0 2000 12 20 17 29 00.0 1 BH? BARD YC 2000 12 21 01 02 00.0 2000 12 21 01 41 00.0 1 BH? BARD YC 2000 12 21 02 41 00.0 2000 12 21 03 20 00.0 1 BH? BARD YC 2000 12 21 13 14 00.0 2000 12 21 13 53 00.0 1 BH? Breq_fast requires something more like this: BARD YC 2000 12 20 16 50 00 2000 12 20 17 29 00 1 BH? BARD YC 2000 12 21 01 02 00 2000 12 21 01 41 00 1 BH? BARD YC 2000 12 21 02 41 00 2000 12 21 03 20 00 1 BH? BARD YC 2000 12 21 13 14 00 2000 12 21 13 53 00 1 BH? replace.pl code The computer has to be in Mac OS X for the current instructions, it's easiest to have a external FAT partition to store all the data in, so some of these steps can be performed on different computers if needbe, or at least so both the Mac OS X and Windows partition can access the same data. Create a new file and copy and paste the contents of the code block, then save as replace.pl #!/usr/bin/perl # replace.pl # # # Created by Adam Urban on 11/30/09. my $fileName=$ARGV0; open(FILE,$fileName) || die("Cannot Open File"); my(@fcont) = ; close FILE; open(FOUT,">$fileName") || die("Cannot Open File"); foreach $line (@fcont) { #This is our find and replace regex! $line =~ s/(.{4})(.{14})(.{9})(\.0)(.{12})(.{9})(\.0)(.{7})/$1 $2 $3 $5 $6 $8/; print FOUT $line; } close FOUT; Using replace.pl and requesting from breq_fast To use replace.pl fire up the command line. # Create an alias to replace.pl #:alias replace=/path/to/replace.pl # Modify request file #:replace /path/to/request/file.req #Copy and paste the contents of the request file into the body of an email addressed to breq_fast@iris.washington.edu and give the email a subject that is descriptive (usually Project_Station name works great) and fire it off. If you have a bunch of requests to fire off at the same time, then copy them all to the same directory, and use replace /path/to/request/files/*.req to change all the request files in one simple step. =Retrieving and dealing with the files from breq_fast= Downloading from breq_fast Once the data has been processed, and is ready to be downloaded dmsque@iris.washington.edu will send back an email. Instead of attaching the files the IRIS server hosts the files on a http or ftp server due to size. #First you have to decide if you want to try to download via ftp or http #: ftp is often more stable which is good for larger files, while http is easier ##If downloading using http just click on the link which will be http://www.iris.edu/pub/userdata/YOUR_USER_NAME ##If downloading via ftp point your ftp client at ftp://ftp.iris.washington.edu/pub/userdata/YOUR_USER_NAME ##:Some recommended ftp clients are Cyberduck and Transmit, but it is possible to use the command line for the whole shebang ##Either download directly to the stations data directory, or copy the file once downloaded Using rdseed to convert the file to SAC files for SplitLab Dive back into the terminal #Alias rdseed so that we can use it for multiple files without having to type out it's entire path #:alias rdseed=/path/to/rdseed #Now use rdseed to create sac files from the compressed file #:rdseed -d /path/to/file.pjt.number #Watch rdseed chug through the file, and then it's ready for SplitLab to add to the projects database Requesting restricted data If the stations that you are requesting data from are restricted there are some steps that have to be done before you email a request into breq_fast, and some steps to do between downloading and converting using rdseed Before requesting Follow the steps in the email that the lead investigator for your project will have sent you. It will involve registering your username on an IRIS webpage and the password for the project's restricted stations. After downloading but before converting The restricted files that you download will end with .openssl instead of .pjt.number In order to convert these files you need to run /usr/bin/openssl enc -d -des -cbc -salt -in filename.pjt.number.openssl -out filename.pjt.number -pass pass:PASSWORD_FROM_EMAIL Then you can return to the normal steps to convert the file so that it can be opened with SplitLab